package day13.part2.demos;

import java.util.Date;

/**
 * @Author juzipi
 * @Date 2021/6/29 16:32
 * @Info
 */
public class ToStringTest {

    public static void main(String[] args) {
        MyDate myDate = new MyDate();
        //输出一个对象的引用实际就是输出它的toString方法
        System.out.println(myDate);
        System.out.println(myDate.toString());

        //很多类都重写了toString方法，返回的就是实体内容
        String s = new String("MM");
        System.out.println(s);
        Date date = new Date(5465151);
        System.out.println(date);
    }

}
